package com.jingtao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jingtao.pojo.Item;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ItemMapper extends BaseMapper<Item> {
    @Select("select count(1) from item ")
    long getTotal() ;

    List<Item> findItemListBypage(@Param("start") int start,
                                  @Param("size") int size,
                                  @Param("query") String query);

    @Update("update itemCat set status=#{status},updated=#{updated} where id = #{id}")
    void updateItemStatus(Item item);
}
